//
//  XFXHomePageTableViewCell.m
//  XFXnews
//
//  Created by dllo on 16/1/27.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "XFXHomePageTableViewCell.h"
@interface XFXHomePageTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *XFXheadview;
@property (weak, nonatomic) IBOutlet UILabel *XFXtext;
@property (weak, nonatomic) IBOutlet UILabel *guanzhu;
@property (weak, nonatomic) IBOutlet UILabel *leixing;
@property (weak, nonatomic) IBOutlet UILabel *jingxing;

@property (weak, nonatomic) IBOutlet UIImageView *photo;



@end

@implementation XFXHomePageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
        
    }
    return self;
}

- (void)createSubviews{
    
}

- (void)setModel:(XFXTopicModel *)model{
    _model = model;
    self.XFXtext.text = _model.alias;
    self.XFXtext.numberOfLines = 0;
    
    NSURL *url = [NSURL URLWithString:_model.picurl];
    [self.XFXheadview sd_setImageWithURL:url placeholderImage:nil];
    
    NSURL *urlone = [NSURL URLWithString:_model.headpicurl];
    [self.photo sd_setImageWithURL:urlone placeholderImage:nil];
    
    self.guanzhu.text = _model.classification;
    self.leixing.text = [NSString stringWithFormat:@"%@",_model.concernCount];
    
    self.jingxing.text = _model.name;
    self.jingxing.textColor = [UIColor whiteColor];
    
    self.contentView.layer.cornerRadius = 5;
    self.contentView.layer.borderWidth = 1;
    self.contentView.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.contentView.layer.masksToBounds = YES;
    
    
    self.photo.layer.cornerRadius = 20;
    self.photo.layer.masksToBounds = YES;
    
}



@end
